package com.wetao.lib_common.bean.response;

import com.wetao.lib_common.utils.StringUtil;

public class QueryClassroomTestQuestionListInfo_page {
    //图片地址
    private String pictureUrl;
    //大图宽度
    private Integer bigPicWidth;
    //大图高度
    private Integer bigPicHeight;
    //
    private Integer pictureId;
    //铺码id
    private Integer bookId;
    //页码
    private Integer pageNumber;
    //
    private Integer sectionNo;
    //
    private Integer ownerNo;
    //云蝶的序列号
    private String pageserial;

    private String ossUrl; //上传图片后存储的地方
    @Override
    public boolean equals(Object obj) {
        if(this == obj){
            return true;//地址相等
        }

        if(obj == null){
            return false;//非空性：对于任意非空引用x，x.equals(null)应该返回false。
        }

        if(obj instanceof QueryClassroomTestQuestionListInfo_page){
            QueryClassroomTestQuestionListInfo_page other = (QueryClassroomTestQuestionListInfo_page) obj;
            //需要比较的字段相等，则这两个对象相等
            if(equalsInt(this.pictureId, other.pictureId)
                    && equalsInt(this.bookId, other.bookId)
                    && equalsInt(this.pageNumber, other.pageNumber)
                    && equalsInt(this.sectionNo, other.sectionNo)
                    && equalsInt(this.ownerNo, other.ownerNo)
            ){
                return true;
            }
        }
        return false;
    }

    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + (pictureId == null ? 0 : pictureId.hashCode());
        result = 31 * result + (bookId == null ? 0 : bookId.hashCode());
        result = 31 * result + (pageNumber == null ? 0 : pageNumber.hashCode());
        result = 31 * result + (sectionNo == null ? 0 : sectionNo.hashCode());
        result = 31 * result + (ownerNo == null ? 0 : ownerNo.hashCode());
        return result;
    }

    private boolean equalsStr(String left, String right) {
        if(StringUtil.isEmpty(left) && StringUtil.isEmpty(right)) {
            return true;
        }
        if(StringUtil.isEmpty(left) || StringUtil.isEmpty(right)) {
            return  false;
        }
        if(left.equals(right)) {
            return true;
        }
        return false;
    }
    private boolean equalsInt(Integer left, Integer right) {
        if(left == null && right == null) {
            return true;
        }
        if(left == null || right == null) {
            return false;
        }
        if(left.intValue() == right.intValue()) {
            return true;
        }
        return false;
    }


    public QueryClassroomTestQuestionListInfo_page() {
    }

    public QueryClassroomTestQuestionListInfo_page(String pictureUrl, Integer bigPicWidth, Integer bigPicHeight, Integer pictureId, Integer bookId, Integer pageNumber, Integer sectionNo, Integer ownerNo, String pageserial, String ossUrl) {
        this.pictureUrl = pictureUrl;
        this.bigPicWidth = bigPicWidth;
        this.bigPicHeight = bigPicHeight;
        this.pictureId = pictureId;
        this.bookId = bookId;
        this.pageNumber = pageNumber;
        this.sectionNo = sectionNo;
        this.ownerNo = ownerNo;
        this.pageserial = pageserial;
        this.ossUrl = ossUrl;
    }

    public String getPictureUrl() {
        return pictureUrl;
    }

    public void setPictureUrl(String pictureUrl) {
        this.pictureUrl = pictureUrl;
    }

    public Integer getBigPicWidth() {
        return bigPicWidth;
    }

    public void setBigPicWidth(Integer bigPicWidth) {
        this.bigPicWidth = bigPicWidth;
    }

    public Integer getBigPicHeight() {
        return bigPicHeight;
    }

    public void setBigPicHeight(Integer bigPicHeight) {
        this.bigPicHeight = bigPicHeight;
    }

    public Integer getPictureId() {
        return pictureId;
    }

    public void setPictureId(Integer pictureId) {
        this.pictureId = pictureId;
    }

    public Integer getBookId() {
        return bookId;
    }

    public void setBookId(Integer bookId) {
        this.bookId = bookId;
    }

    public Integer getPageNumber() {
        return pageNumber;
    }

    public void setPageNumber(Integer pageNumber) {
        this.pageNumber = pageNumber;
    }

    public Integer getSectionNo() {
        return sectionNo;
    }

    public void setSectionNo(Integer sectionNo) {
        this.sectionNo = sectionNo;
    }

    public Integer getOwnerNo() {
        return ownerNo;
    }

    public void setOwnerNo(Integer ownerNo) {
        this.ownerNo = ownerNo;
    }

    public String getPageserial() {
        return pageserial;
    }

    public void setPageserial(String pageserial) {
        this.pageserial = pageserial;
    }

    public String getOssUrl() {
        return ossUrl;
    }

    public void setOssUrl(String ossUrl) {
        this.ossUrl = ossUrl;
    }

    @Override
    public String toString() {
        return "QueryClassroomTestQuestionListInfo_page{" +
                "pictureUrl='" + pictureUrl + '\'' +
                ", bigPicWidth=" + bigPicWidth +
                ", bigPicHeight=" + bigPicHeight +
                ", pictureId=" + pictureId +
                ", bookId=" + bookId +
                ", pageNumber=" + pageNumber +
                ", sectionNo=" + sectionNo +
                ", ownerNo=" + ownerNo +
                ", pageserial='" + pageserial + '\'' +
                ", ossUrl='" + ossUrl + '\'' +
                '}';
    }
}
